package org.jeecg.codegeneweb.template;

import lombok.Data;
import org.jeecg.codegeneweb.DestinationLocation;

import java.io.File;

@Data
public class DestinationSingleFileDomain extends DestinationLocation {
    public DestinationSingleFileDomain(){}
    public DestinationSingleFileDomain (TemplateSingleFileDomain templateSingleFileDomain) {
        this.setTemplateSingleFileDomain(templateSingleFileDomain);
    }
    public void setTemplateSingleFileDomain(TemplateSingleFileDomain templateSingleFileDomain) {
        this.templateSingleFileDomain = templateSingleFileDomain;
        //this.templateSingleFileDomain.setDestinationSingleFileDomain(this);
    }

    private TemplateSingleFileDomain templateSingleFileDomain;

    public String getDesitinationAbsolutePath(){
        return this.getProject_path() + File.separator + this.getSrcmainjava() + File.separator + this.getBussi_package()+File.separator+this.getEntityname();
    }
    public File getFileDestinationAbsolutePath(){
        return new File(getDesitinationAbsolutePath());
    }
}
